class Solution:
    def getRow(self, rowIndex: int):
        rowIndex+=1
        triangle = []
        for i in range(rowIndex):
            triangle.append([1] * (i + 1))
        for i in range(0, rowIndex):
            for k in range(1, i):
                triangle[i][k] = triangle[i - 1][k - 1] + triangle[i - 1][k]
        print(triangle)
        return triangle[rowIndex-1]